﻿import kliment.data.calendar.Year;
/**
 * ...
 * @author	Kliment
 * @version	0.1.0
 */
class kliment.data.calendar.Month {
	private var _DAYS_IN_MONTH:Array = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
	
	public var year:Year;
	
	/**
	 * 
	 * @param	year:Number 
	 * @param	month:Number 1..12
	 */
	public function Month(year:Number, month:Number) {
		month--;
		var startDay:Number = new Date(year, month , 1).getDay();
		var lastDay:Number = _DAYS_IN_MONTH[month];
		if (Year.isLeap(year) && month == 1)
			lastDay = 29;
	}
}